<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Protocol Buffers 浏览器演示</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      line-height: 1.6;
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
    }
    .container {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }
    .form-group {
      margin-bottom: 15px;
    }
    label {
      display: block;
      margin-bottom: 5px;
      font-weight: bold;
    }
    input {
      padding: 8px;
      width: 100%;
      border: 1px solid #ddd;
      border-radius: 4px;
    }
    button {
      padding: 10px 15px;
      background-color: #4CAF50;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    button:hover {
      background-color: #45a049;
    }
    .result-container {
      border: 1px solid #ddd;
      padding: 15px;
      border-radius: 4px;
    }
    .buffer, .decoded {
      background-color: #f5f5f5;
      padding: 10px;
      border-radius: 4px;
      overflow-x: auto;
    }
    pre {
      margin: 0;
      white-space: pre-wrap;
    }
    .error {
      color: #d32f2f;
      background-color: #ffebee;
      padding: 10px;
      border-radius: 4px;
    }
  </style>
</head>
<body>
  <h1>Protocol Buffers 浏览器演示</h1>
  
  <div class="container">
    <div id="form-container">
      <!-- 表单将通过 JavaScript 动态添加 -->
      <p>正在加载...</p>
    </div>
    
    <div id="output">
      <!-- 结果将显示在这里 -->
    </div>
  </div>
  
  <script type="module" src="index.js"></script>
</body>
</html>